home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-17 | 2.4 KB | 68 lines | [ttro/ttxt] |
- _______________________________________________________________
- TimGA — A freeware Mac application
- Version 1.1 (August 1996)
-
- By Timo Eloranta
- Copyright © 1995-96 Brown Eyes Software
- All rights reserved.
-
- Internet e-mail: timo.eloranta@ac.com
- _______________________________________________________________
-
- Writing graph files
-
- This document explains how you can write new graph files for TimGA.
-
- The files in the "Graphs" folder are actually ordinary TEXT files with
- creator type set to 'TiGA' (without this creator type the files wouldn't
- show up with the custom icon...). The easiest way of creating a new
- graph file with the correct creator type is duplicating one of the original
- graph files. (Duplication is done in the Finder by selecting the file to be
- duplicated and then choosing the Duplicate command from the File menu.)
-
- You can open your new graph file with any text editor (for example
- Apple's SimpleText). Here's an example of how a simple graph (a path
- with 5 nodes) might look like:
-
- _________________
-
- |V|: 5 // Number of nodes
- |E|: 4 // Number of edges
-
- 1 2 // Edges are represented as pairs of node numbers...
- 2 3
- 3 4
- 4 5
-
- ---
- This graph is a path.
- _________________
-
- This example file has actually much more stuff in it than necessary,
- since TimGA ignores everything but the numbers !!!
-
- Here are the things that really matter:
-
- • The first number in the text should be the quantity of nodes
- in the graph (5 in this example).
- • The second number in the text should be the quantity of edges
- in the graph (4 in this example).
- • After giving the node and edge quantities, you should list the
- edges as pairs of nodes. If your graph is complex, it might be
- a good idea to draw it first on paper. The nodes should be
- numbered from 1 to |V|, where |V| means the quantity of nodes.
- The order in which the edges are listed doesn't matter...
- and neither does the order in which the nodes are given in
- the pairs (In other words, the edges are undirected).
-
- Both of the following mean just the same as the one above:
-
- 5 4 5 4 4 3 3 2 2 1
- or 5 4 2 1 4 5 4 3 2 3.
-
- That's it. When you're finished save your document with the name
- of your choice. You can now open the graph with TimGA.
-
- If you have any problems, let me know. If your problems are not
- related to TimGA, I'm probably as clueless as you are... <grin>
-